import os
import pyautogui
import uiautomation
from config.config import DATA_PATH
from page.index import IndexPage
from page.住院医生站.住院医生站.zhuyuanyishengzhan__page import zhuyuanyishengzhan
from page.住院护士站.住院护士站.zhuyuanhushizhan__page import zhuyuanhushizhan

from tools.sjqd_way import read_data_from_excel


class Tiaoshi():
    his = uiautomation.WindowControl(searchDepth=1, Name='科玛奇医院信息管理系统')  # 锁定窗口
    his.SetFocus()
    def chuciruyuan(self):
        self.data = read_data_from_excel(os.path.join(DATA_PATH, "datas.xls"), "测试患者")
        name = self.data[0][0]
        ap = IndexPage()
        bp = zhuyuanhushizhan()
        ap.click_zyhsz1_btn()
        ap.click_zyhsz2_btn()
        bp.choose_bq('内科病区')#选择病区
        # bp.input_hzxx(name)#输入住院患者姓名
        # bp.click_cx_btn()#点击查询按钮
        # bp.click_yzzx_btn()#点击医嘱执行
        # bp.click_gzd_btn()#点击工作单
        # bp.click_lyd_btn()#点击领药单
        # bp.click_zdjf_btn()#点击自动计费
        # bp.click_scd_btn()#点击三测单
        # bp.click_dzblln_btn()#点击电子病历浏览
        # bp.click_yrqdfydy_btn()#点击一日清单打印
        bp.ckick_apcw('吴川粤西医院管理员','吴川粤西医院管理员','吴川粤西医院管理员','陈彩凤')#安排床位
if __name__ == '__main__':
    Tiaoshi().chuciruyuan()
